package com.wyl.auth.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import javax.persistence.*;
import java.io.Serializable;

/**
 * @Description 省市区-字典
 * @Author WuYiLong
 * @Date 2024-11-24
 */
@Data
@TableName("d_full_city")
@Entity
@Table(name="d_full_city")
@org.hibernate.annotations.Table(appliesTo = "d_full_city",comment = "省市区-字典")
public class FullCity extends Model<FullCity> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(columnDefinition = "bigint comment '主键ID'")
    private Long id;

    @Column(columnDefinition = "varchar(255) comment '名称'")
    private String name;

    @Column(columnDefinition = "varchar(255) comment '区域码'")
    private String code;

    @Column(columnDefinition = "varchar(255) comment '全名称'")
    private String fullName;

    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
